import bpy
from mathutils import Matrix
from bpy.types import Operator













# Register:
def f_menu_模型资源导入(self, context):
	'''self.layout.operator(
		add_mesh_bolt.bl_idname,
		text="Bolt",
		icon="MOD_SCREW")'''
	#self.lay_out.operator_context = 'INVOKE_REGION_WIN'
	self.layout.separator()
	self.layout.popover(panel="C_PT_素材选取面板", text="素材选取", icon='FILTER')
	#配置布局.operator("object.global_node_get_mesh_faces")

classes = (
	#C_素材选取面板,
	#C_NODE_MENU_资源器_切换页面,
	#add_mesh_bolt,
	#f_menu_模型资源导入
)



def register():
	from bpy.utils import register_class
	for cls in classes:
		register_class(cls)
	bpy.types.VIEW3D_MT_mesh_add.append(f_menu_模型资源导入)
	print('mbt--------------------------------mbt')
	#import bpy.utils.previews
	#pcoll = bpy.utils.previews.new()
	# path to the folder where the icon is
	# the path is calculated relative to this py file inside the addon folder
	#my_icons_dir = os.path.join(os.path.dirname(__file__), "icons")
	# load a preview thumbnail of a file and store in the previews collection
	#pcoll.load("my_icon", os.path.join(my_icons_dir, "icon-image.png"), 'IMAGE')
	#preview_collections["main"] = pcoll


def unregister():
	from bpy.utils import unregister_class
	for cls in reversed(classes):
		unregister_class(cls)
	bpy.types.VIEW3D_MT_mesh_add.remove(f_menu_模型资源导入)
	print('mbt--------------------------------mbt')




